package www.sofn.com.sys.roles.domain.vo;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import lombok.Data;
import org.hibernate.validator.constraints.Length;
import www.sofn.com.validate.group.InsertGroup;
import www.sofn.com.validate.group.UpdateGroup;

import java.util.List;

@Data
@Schema(description = "角色")
public class SysRolesVO {

    @Schema(description = "角色Id")
    @NotBlank(message = "角色id不能为空",groups = UpdateGroup.class)
    private String id;
    @Schema(description = "角色名称")
    @NotBlank(message = "角色名称不能为空",groups = {UpdateGroup.class, InsertGroup.class})
    @Length(max=20, message = "角色名称不能大于{max}个字符")
    private String name;
    @Length(max=255, message = "备注不能大于{max}个字符")
    @Schema(description = "备注")
    private String remarks;
    @Schema(description = "资源")
    private List<String > resources;
}
